package com.hsb.seckill.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hsb.seckill.entity.User;
import com.hsb.seckill.vo.LoginVo;
import com.hsb.seckill.result.ResBean;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * (User)表服务接口
 *
 * @author makejava
 * @since 2021-09-04 15:57:32
 */
public interface UserService extends IService<User> {
    /**
     * 登录
     * @param loginVo
     * @param request
     * @param response
     * @return
     */
    ResBean doLogin(LoginVo loginVo, HttpServletRequest request, HttpServletResponse response);

    /**
     * 根据cookie获取用户
     * @param userTicket
     * @return
     */
    User getUserByCookie(String userTicket,HttpServletRequest request,HttpServletResponse response);

    /**
     * 更新用户密码
     * @param ticket
     * @param password
     * @return
     */
    ResBean updatePassword(String ticket,String password,HttpServletRequest request,HttpServletResponse response);
}